﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mode
{
    public class are_table
    {
        public are_table() { }
        public are_table(int vid, string vname, int vlevel)
        {
            this.id = vid;
            this.name = vname;
            this.level = vlevel;
        }
        public int id { get; set; }
        public string name { get; set; }
        public int level { get; set; }
    }

    public class POWER
    {
        public POWER(int power)
        { 
            this.power = power;
            switch (power)
            {
                case 0: this.name = "用户"; break;
                case 1: this.name = "管理员"; break;
                case 2: this.name = "公共"; break;
                default: throw new System.Exception("遇到未知的角色权限..");
            }
        }

        private int power;
        private string name;

        public int Power { get { return power; } }
        public string PowerName { get { return name; } }
    }

    public class role_table
    {
        public role_table() { }

        public int id { get; set; }
        public string name { get; set; }
        public POWER power { get; set; }
        public string remark { get; set; }
        public DateTime date { get; set; }
    }
    public class role_tableEx
    {
        public role_tableEx() { }

        public int id { get; set; }
        public string name { get; set; }
        public int issslect { get; set; }
       
      
    }

    public class are_role_table
    {
        public int areRoleID { get; set; }
        public int id { get; set; }
        public string name { get; set; }
        public POWER power { get; set; }
        public string remark { get; set; }
        public DateTime date { get; set; }
        public bool status { get; set; }
    }

    public class are_role_view
    {
        public int J_ID { get; set; }
        public int A_ID { get; set; }
        public string A_NAME { get; set; }
        public int A_LEVEL { get; set; }
        public int R_ID { get; set; }
        public string R_NAME { get; set; }
        public int R_POWER{get; set;}
        public string R_REMARK { get; set; }
        public DateTime R_DATE { get; set; }
    }
}
